Web browsers are increasingly used as platforms for two-way client-server and peer-to-peer architecture communications, both in traditional electronic documents and increasingly in audio-video communications. Such communications may use layered Uniform Resource Identifiers (URIs) employing a variety of protocol stacks, e.g., Transmission Control Protocol (TCP), User Data Protocol (UDP), Hypertext Transfer Protocol (HTTP)/Stream Control Transmission Protocol (SCTP), WebSocket (WS), Datagram Congestion Control Protocol (DCCP), etc.
When a link containing a conventional URI is clicked, browsers are instructed to retrieve the representation of the resource at the URI. However, layered URIs may be problematic for certain web applications. For example, a HyperText Markup Language (HTML) webpage may contain the following multi-level URI in a link according to the following code: <a href=http://xmpp:bob@example.com/camera> This is my camera</a>. The first level of this URI is an HTTP level and the second level is an Extensible Messaging and Presence Protocol (XMPP) level. If the executing browser does not inherently support XMPP, when the link is clicked the browser may not recognize the referenced authority “xmpp:bob@example.com”, e.g., because the XMPP library is defined in JavaScript. Consequently, the browser may not know the association between the authority and the XMPP library. Browsers generally cannot submit forms to URIs without knowing how to contact the authority of the URI. As the result, HTTP requests may not be invokable from built-in HTML interactions existing in the browser. Rather, web applications may have to write their own code to handle all such URIs in HTML pages, e.g., to dereference URI and submit forms. This may create an extra burden on developers for using protocol bindings.
The various communications protocol stacks are generally hidden from web applications, as no standardized JavaScript Application Programming Interfaces (APIs) are defined for them. It has historically been resource prohibitive for web browsers to support all such combinations concurrently. Consequently, web developers have generally had to either (a) wait for browsers to implement support for such protocols (which may lead to increased web browser footprints), or (b) write JavaScript to take over hyperlink interactions from the web browsers (which may increase JavaScript size and thereby reduces performance). The ability to use a layered URI may provide certain flexibility to web developers, e.g., by permitting innovation while avoiding interoperability problems.